package com.lf.service.impl;

import com.lf.mapper.CommentMapper;
import com.lf.model.EbComment;
import com.lf.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {
    @Autowired
    private CommentMapper commentMapper;
    @Override
    public List<EbComment> list (int page, int pageSize){
        return commentMapper.findByPage((page-1)*pageSize,pageSize);
    }

    @Override
    public int getMaxPage(int pageSize) {
        return commentMapper.getMaxPage(pageSize);
    }
}
